package com.wolfsea.rvitemdecorationdemo
import android.content.Context
import android.util.TypedValue

/**
 *@desc 顶层扩展函数
 *@author liuliheng
 *@time 2022/3/20  10:04
 **/
fun Context.dp2px(dp: Float): Float =
    TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, resources.displayMetrics)